<!DOCTYPE html>
<html lang="en">
<head>
    {template 'common/edithead'}
    <!--微擎 -->
    <!--这个放在最后一切平白安全-->
    <script type="text/javascript" src="./resource/js/require.js?v=20170915"></script>
</head>
<body class="nav-md" style="min-width: 800px">
<div>
    <div class="container xc_edit_from" >
        <div class="main_container" style="overflow-x: hidden;min-height: calc(100vh - 20px);background-color: white;width: 100%;">
            <div class="col-md-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_content">
                        <br/>
                        <form class="form-horizontal" role="form" method="post" action="" name="submit">
                            <input type="hidden" name="xkey" value="{$xkey}">
                            <input type="hidden" name="xc[check_list]">
                            <div class="form-group">
                                <label  class="col-sm-2 control-label">分享赠送积分</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control"  name="share_score" id="title" value="{$info['share_score']}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">分享海报图</label>
                                <div class="col-sm-8">
                                    {php echo tpl_form_field_image('bimg', $info['bimg']);}
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <input type="button" name="submit" class="btn btn-default" value="提交">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{template 'common/editfoot'}
<script>
    $(function(){
        $("input[name='submit']").click(function(){
            var data=$(".form-horizontal").serialize();
            $.ajax({
                type:"post",
                url:"{url 'site/entry/'.$_GPC['do'],array('m'=>$_GPC['m'],'op'=>'share_score_save','version_id'=>$_GPC['version_id'])}",
                data:data,
                dataType:'json',
                success:function(res){
                    if(res.status==1){
                        swal('操作成功!', '操作成功!', 'success');
                    }else{
                        swal('操作失败!', '操作失败!', 'error');
                    }
                }
            })
        });
    });
</script>
</body>
</html>